Japanese Patent Application Publication No. 2014-036110 discloses a technique in which impurities are implanted into a front surface of a semiconductor substrate, and then the front surface is irradiated with a laser such that the impurities implanted into the semiconductor substrate are activated. Further, in this technique, the front surface of the semiconductor substrate is irradiated with lasers of two types having different pulse durations such that increase in temperature of a rear surface of the semiconductor substrate (an opposite surface to the front surface of the semiconductor substrate which is irradiated with the light) is suppressed.